package com.usian.controller;

import com.usian.apis.user.ApUserRealnameControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.AuthDto;
import com.usian.service.ApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/auth")
public class
ApUserRealnameController implements ApUserRealnameControllerApi {
    @Autowired
    private ApUserRealnameService apUserRealnameService;

    @PostMapping("/list")
    @Override
    public ResponseResult loadListByStatus(@RequestBody  AuthDto dto) {
        return apUserRealnameService.loadListByStatus(dto);
    }

    /**
     * 审核是否成为自媒体用户
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto) {

        return apUserRealnameService.updateStatusById(dto);
    }

}
